// pages/video/video.js
const app = getApp();
Page({
  data: {
    videoList: [],
    MockList:[]
  },
  onLoad() {
    this.getVideo()
    this.getMock()
  },
  getVideo() {
    app.get("video/list").then((res) => {
 
      this.setData({
        videoList: res.data
      })
    })
  },
  getMock() {
    app.get("info/list").then((res) => {
      this.setData({
        MockList: res.data
      })
    })
  },
  onChange(event) {
    let type = event.detail.name
    if (type == 1) {
      this.getVideo()
    }
    if (type == 2) {
      this.getMock()
    }
  }
})